import QtQuick 2.15
import QtQuick.Controls 2.15

// ClickableImage1.qml

// Simple image which can be clicked

Item {
    id: root

    height: container.childrenRect.height
    width: container.childrenRect.width
	property alias text:label.text
	property alias source:image.source
	signal clicked
    Column {
        id: container

        Image {
            id: image
        }
		Text{
			id:label
			width:image.width
			horizontalAlignment:Text.AlignHCenter
			wrapMode:Text.WordWrap
			color:'#ECECEC'
		}
    }
    MouseArea {
        anchors.fill: parent
        onClicked: root.clicked()
    }
}